﻿@model ValidationAttributes.Models.FormModel
<h2>Data Validation</h2>
<div class="row">
	<div class="col-md-16">
		<section>
			@Html.ValidationSummary()
			<form method="POST" class="form-horizontal" role="form">
				<div class="form-group">
					@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
					<div class="col-md-8">
						@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
						@Html.ValidationMessageFor(m => m.UserName)
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
					<div class="col-md-8">
						@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
						@Html.ValidationMessageFor(m => m.Password)
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
					<div class="col-md-8">
						@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
						@Html.ValidationMessageFor(m => m.ConfirmPassword)
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(m => m.City, new { @class = "col-md-2 control-label" })
					<div class="col-md-8">
						@Html.DropDownListFor(m => m.City, Model.Cities.Select(x => new SelectListItem {Text = x}), new { @class = "form-control" })
						@Html.ValidationMessageFor(m => m.City)
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(m => m.RememberMe, new { @class = "col-md-2 control-label" })
					<div class="checkbox">
						@Html.CheckBoxFor(m => m.RememberMe, new { style = "margin-left: 14px;" })
						@Html.ValidationMessageFor(m => m.RememberMe)
					</div>
				</div>
				<div class="col-md-offset-2 col-md-10">
					<input type="submit" value="Submit" class="btn btn-primary btn-large">
				</div>
			</form>
		</section>
	</div>
</div>